Writing software in the real world is a much more difficult process than what we've done so far. Lots of people are involved!
Lead Designer/Software Architect ($100,000+/year)
This person (or these people) are responsible for the overall design of the program. They'll explain how the pieces fit together and split the work up so that everyone will have a piece to work on. They are "vision" people.
Software Engineer ($50,000-$100,000/year)
This person (or these people) are responsible for making the designer's vision a reality. They'll be responsible for just a few small pieces of the overall design.
Quality Assurance / Software Tester ($60,000-$120,000/year)
The QA person (or people) are the ones who make sure the software does what the Software Engineers and Designers say that it should do. Their work will include testing pieces as small as individual functions, or as large as the end product!
Tech Writer ($50,000-$75,000/year)
The Tech Writer will make sure that things are documented correctly. They'll fine tune comments, and make sure that the code is in good shape to be used again in the future. They may also be responsible for writing manuals and other documentation.
There are other rolls as well depending on the type of software. For example, games will have someone in charge of Art, Game Balancing and Play Testing. The point is, it takes a lot of people to write software!
Assignment
Your assignment is to play the rolls of Software Engineer and Software Tester (perhaps with a bit of Art, Game Balancing and Play Testing thrown in as well).
As the Lead Designer, I've created the basic outline of a great game I call Om-Nom. The mechanics are simple:
You are a hungry creature! Use the keyboard to move the creature towards the food. Touch the food to eat it. The bigger the food, the more points you get. You have a limited amount of time to eat all you can!
The game is already designed and the main part already implemented for you. As Software Engineers and Testers you'll need to implement the functions that make the game work.
You can see demonstration versions on X:\MSIT\demos\final\
There are two versions:
minimum version: no real customization. (you would earn 100% with this version)
fun version: better art, better story, better everything! (you would get extra credit with this version)
Requirements
Correctly implement all functions: 28 pts
Demonstrate, outside of the game, that each function works as specified: 28 pts (that is, 3 tests [and their expected results] per function)
Neat, orderly code with comments: 4pts
Total: 60 pts (divided between 3 members. Individual total will be out of 20)
Extra Credit
There is definitely a chance for extra credit in this program!
drawBackground() is more than just a solid color background: 2pts
drawGameEndScreen() changes depending on the player's score: 2pts
drawTarget() draws something different than just a simple rect() or ellipse(): 4pts
drawPlayer() draws something other than a simple rect() or ellipse(): 4pts
Substantial effort is evident to make the game 'cool': 5pts
Total: 17pts Extra Credit Possible!
Procedure
There are 3 jobs:
Tester: needs to meet with me on Monday to understand how I want code tested. Will be responsible for testing the functions.
Programmer: will be responsible for implementing the functions
DocumentationWriter: will be responsible for understanding the functions and explaining the pieces that I ask about.
Given
There are a total of 14 functions your team must implement. Their headers are below.
int increaseScore(int s, int prev)int changeTargetSize(int min, int max)boolean touchedTarget(int pX, int pY, int plSize, int tX, int tY, int tarSize)//drawing related functionsvoid drawBackground(color bg)void drawGameEndScreen(int s)void drawTarget(color target, int x, int y, int size)void drawTime(color tC, float t)void drawScore(color sC, int s)void drawPlayer(color player, int x, int y, int playerSize)//movement related functionsint moveTarget(int size)int moveUp(int y, int speed)int moveDown(int y, int speed)int moveLeft(int x, int speed)int moveRight(int x, int speed)
The game, with unimplemented functions is below:
/**
* Title: Om-Nom
* Game Designer: Lyle Kozloff
* Date: May 17, 2012
* Description: In Om-Nom you control a creature who wants to eat things!
* the bigger the thing it eats, the more points you get!
* Guide the creature to the targets to eat them. Careful though, you have
* a limited amount of time!
**//*** BEGIN GAME OPTIONS ***///set starting position of playerint pPosX =200;//that is, player position Xint pPosY =200;int pSize =50;//set initial position and size of targetint tPosX =(int)random(0,300);//that is, target position xint tPosY =(int)random(0,300);int tSize =(int)random(25,100);//set up game rulesfloat time =20;int score =0;//keys we will use to control the gamechar upKey ='w';char leftKey ='a';char rightKey ='d';char downKey ='s';//size of the board, change this and the board gets bigger.finalint BOARDSIZE=300;//how fast the player moves, higher numbers move the player fasterfinalint SPEED =4;//set up the minimum and maximum sizes for our targetsfinalint MINTSIZE =50;//hard mode is when the minimum target size is smaller than the player!finalint MAXTSIZE =100;//various colors for different game elements
color pColor = color(255,255,255);
color tColor = color(255,0,0);
color statusColor = color(0,255,0);
color backgroundColor = color(0,0,0);/*** END OPTIONS ***/void setup(){
smooth();
noStroke();
size(BOARDSIZE,BOARDSIZE);
rectMode(CENTER);//only need if you're using rectangles, see me if you're using something else}void draw(){//make a beautiful background
drawBackground(backgroundColor);//draw the target in its current location with its size
drawTarget(tColor,tPosX,tPosY,tSize);//if we still have time, draw the player, time and scoreif(time >0){
drawPlayer(pColor, pPosX, pPosY, pSize);
drawTime(statusColor, time);
drawScore(statusColor, score);}//if someone presses a key - see if they are trying to moveif(keyPressed){//update the player position based on their last location, and the game speed.if(key == upKey) pPosY = moveUp(pPosY, SPEED);if(key == downKey) pPosY = moveDown(pPosY, SPEED);if(key == leftKey) pPosX = moveLeft(pPosX, SPEED);if(key == rightKey) pPosX = moveRight(pPosX, SPEED);}//test to see if the player is touching the targetif(touchedTarget(pPosX,pPosY,pSize,tPosX,tPosY,tSize)){
score = increaseScore(tSize,score);//the bigger the object, the more the points!
tPosX = moveTarget(tSize);//get a new X location for the target
tPosY = moveTarget(tSize);
tSize = changeTargetSize(MINTSIZE,MAXTSIZE);//get a new target size}//if we're out of time, end the game!if(time<=0){
drawGameEndScreen(score);}//each time we check everything, decrease the time and start over at the top
time -=.01;}//end void draw()/*** BEGIN FUNCTIONS ***//**
* title: drawBackground
* arguments: a background color
* returns: void
* description: sets the background color to the specified color
**/void drawBackground(color bg){}/**
* title: drawGameEndScreen
* arguments: the score, s
* returns: void
* description: displays the game ending screen, including the score
**/void drawGameEndScreen(int s){}/**
* title: moveTarget
* arguments: size of the target
* returns: a random int within the bounds of the screen (affected by how big the target is!)
* description: generates a coordinate that will let the target be on screen for the current size
* notes: the target should always appear fully on screen.
* hint: you can use the variable BOARDSIZE to make sure your target isn't half on and half off the screen
**/int moveTarget(int size){}/**
* title: changeTargetSize
* arguments: minimum and maximum size of target
* returns: a random int between the minimum and maximum size
* description: generates the size of your target
**/int changeTargetSize(int min, int max){}/**
* title: touchedTarget()
* arguments: player location and size, target location and size
* returns: true if the target is being touched by the player, false if not
* description: see above
* notes: you can assume that if the center of the player is inside the target, it is being touched.
* hint: this is similar to what we did in PaintPots
**/boolean touchedTarget(int pX, int pY, int plSize, int tX, int tY, int tarSize){}/**
* title: drawTarget
* arguments: a color, x position, y position and size of target
* returns: void
* description: sets the target color to the specified color, and it's position to x and y with size
**/void drawTarget(color target, int x, int y, int size){}/**
* title: drawTime
* arguments: a color and the current time
* returns: void
* description: displays the time remaining on the screen
**/void drawTime(color tC, float t){}/**
* title: drawScore
* arguments: a color and the current score
* returns: void
* description: displays the current score on the screen
**/void drawScore(color sC, int s){}/**
* title: increaseScore
* arguments: the amount you want to increase the score by (s) and the previous score (prev)
* returns: the new score
* description: calculates the new score based on a number of points and the previous score value
**/int increaseScore(int s, int prev){}/**
* title: drawPlayer
* arguments: a color, x position, y position and size of the player
* returns: void
* description: sets the player color to the specified color, and it's position to x and y with size
* hint: you can get very creative with your player! It doesn't have to be just a box!
**/void drawPlayer(color player, int x, int y, int playerSize){}/**
* title: moveUp
* arguments: the current y position of the player, and the speed of movement
* returns: the new y position of the player
* description: moves the player up. If the player goes off the top of the screen, they should emerge on the bottom
* hint: all of the move functions are essentially the same: you will add the two inputs and return the result
* UNLESS the player has moved off the screen. If they have, you'll return the appropriate location.
**/int moveUp(int y, int speed){}/**
* title: moveDown
* arguments: the current y position of the player, and the speed of movement
* returns: the new y position of the player
* description: moves the player up. If the player goes off the bottom of the screen, they should emerge on the top
**/int moveDown(int y, int speed){}/**
* title: moveLeft
* arguments: the current x position of the player, and the speed of movement
* returns: the new x position of the player
* description: moves the player left. If they go off the edge of the screen, they should emerge on the other side
**/int moveLeft(int x, int speed){}/**
* title: moveRight
* arguments: the current x position of the player, and the speed of movement
* returns: the new x position of the player
* description: moves the player right. If they go off the edge of the screen, they should emerge on the other side
**/int moveRight(int x, int speed){}
Final Project: Om-Nom, the game!
Introduction
Writing software in the real world is a much more difficult process than what we've done so far. Lots of people are involved!Lead Designer/Software Architect ($100,000+/year)
This person (or these people) are responsible for the overall design of the program. They'll explain how the pieces fit together and split the work up so that everyone will have a piece to work on. They are "vision" people.
Software Engineer ($50,000-$100,000/year)
This person (or these people) are responsible for making the designer's vision a reality. They'll be responsible for just a few small pieces of the overall design.
Quality Assurance / Software Tester ($60,000-$120,000/year)
The QA person (or people) are the ones who make sure the software does what the Software Engineers and Designers say that it should do. Their work will include testing pieces as small as individual functions, or as large as the end product!
Tech Writer ($50,000-$75,000/year)
The Tech Writer will make sure that things are documented correctly. They'll fine tune comments, and make sure that the code is in good shape to be used again in the future. They may also be responsible for writing manuals and other documentation.
There are other rolls as well depending on the type of software. For example, games will have someone in charge of Art, Game Balancing and Play Testing. The point is, it takes a lot of people to write software!
Assignment
Your assignment is to play the rolls of Software Engineer and Software Tester (perhaps with a bit of Art, Game Balancing and Play Testing thrown in as well).As the Lead Designer, I've created the basic outline of a great game I call Om-Nom. The mechanics are simple:
You are a hungry creature! Use the keyboard to move the creature towards the food.
Touch the food to eat it.
The bigger the food, the more points you get.
You have a limited amount of time to eat all you can!
The game is already designed and the main part already implemented for you. As Software Engineers and Testers you'll need to implement the functions that make the game work.
You can see demonstration versions on X:\MSIT\demos\final\
There are two versions:
Requirements
Total: 60 pts (divided between 3 members. Individual total will be out of 20)
Extra Credit
There is definitely a chance for extra credit in this program!- drawBackground() is more than just a solid color background: 2pts
- drawGameEndScreen() changes depending on the player's score: 2pts
- drawTarget() draws something different than just a simple rect() or ellipse(): 4pts
- drawPlayer() draws something other than a simple rect() or ellipse(): 4pts
- Substantial effort is evident to make the game 'cool': 5pts
Total: 17pts Extra Credit Possible!Procedure
There are 3 jobs:Given
There are a total of 14 functions your team must implement. Their headers are below.The game, with unimplemented functions is below:
if(touchedTarget(pPosX,pPosY,pSize,tPosX,tPosY,tSize)){